#ifndef __UTIL_H__
#define __UTIL_H__

#include "main.h"

extern char *strcpyLeft(char *dest, const char *src, int n);
extern char *strcpyRight(char *dest, const char *src, int n);
extern char *strcpySub(char *dest, const char *src, char start, int n);
extern double _strtod(char *nptr, char **endptr);

#ifdef DEBUG
#define dprintf(format, ...) printf(format, ##__VA_ARGS__)
#else
#define dprintf(format, ...)
#endif

#ifdef DEBUG
#define dflprintf(format, ...) printf("FILE: "__FILE__            \
				    ", LINE: %d: " format " ", \
				    __LINE__, ##__VA_ARGS__)
#else
#define dflprintf(format, ...)
#endif

#endif //__UTIL_H__
